﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BasePlatformNet
{
    public class RDMParameters
    {
        public UInt64 dest_uid;

        public RDMParameters(string uid)
        {
            byte[] UIDByte = Tools.String2BytesEx(uid);
            dest_uid = 0;
            for (int i = 0; i < UIDByte.Length; i++)
            {
                dest_uid = dest_uid << 8;
                dest_uid |= UIDByte[i];
            }
        }
    }

    class RDMParaDMXAddr : RDMParameters
    {
        public UInt16 DMXAddress;

        public RDMParaDMXAddr(string uid, UInt16 addr)
            : base(uid)
        {
            this.DMXAddress = addr;
        }
    }

    class RDMParaDescParas : RDMParameters
    {
        public UInt16 pid;

        public RDMParaDescParas(string uid, UInt16 pid)
            : base(uid)
        {
            this.pid = pid;
        }
    }

    class RDMParaIndetify : RDMParameters
    {
        public byte IdentifySwitch;
        public RDMParaIndetify(string uid, byte ISwitch)
            : base(uid)
        {
            this.IdentifySwitch = ISwitch;
        }
    }

    class RDMParaSensor : RDMParameters
    {
        public byte SensorId;
        public RDMParaSensor(string uid, byte id)
            : base(uid)
        {
            this.SensorId = id;
        }
    }
}
